package com.asdf.ui;

import java.awt.Toolkit;

import javax.swing.BoxLayout;
import javax.swing.JFrame;

public abstract class Dialog extends JFrame
{

	private static final long	serialVersionUID	= - 487130251187503734L;
	
	protected void drawLabelsAndInputs( )
	{
	
	}
	
	public Dialog( String caption)
	{
		super( caption);
		setLayout( new BoxLayout( getContentPane( ), BoxLayout.Y_AXIS));
		setResizable( false);
		centrilize( );
		setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
	}

	 void centrilize( )
	{
		Toolkit toolkit = Toolkit.getDefaultToolkit( );
		int x = ( toolkit.getScreenSize( ).width - getWidth( ))/2;
		int y = ( toolkit.getScreenSize( ).height - getHeight( ))/2;
		setLocation( x, y);
	}

	
}
